<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<nav aria-label="Page navigation">
	<span> 共 ${pageInfo.total } 条数据 </span> <br />
	<ul class="pagination">
		<li <c:if test="${!pageInfo.hasPreviousPage }">class="disabled"</c:if>>
			<a
			<c:if test="${pageInfo.hasPreviousPage }">href="javascript:void(0);"</c:if>
			aria-label="Previous" data-pageNum="${pageInfo.prePage }"> <span
				aria-hidden="true">&laquo;</span>
		</a>
		</li>

		<c:forEach items="${pageInfo.navigatepageNums }" var="each">
			<li <c:if test="${each == pageInfo.pageNum }">class="active"</c:if>>
				<a href="javascript:void(0);" data-pageNum="${each }">${each }</a>
			</li>
		</c:forEach>

		<li <c:if test="${!pageInfo.hasNextPage }">class="disabled"</c:if>>
			<a
			<c:if test="${pageInfo.hasNextPage }">href="javascript:void(0);"</c:if>
			aria-label="Next" data-pageNum="${pageInfo.nextPage }"> <span
				aria-hidden="true">&raquo;</span>
		</a>
		</li>
	</ul>
</nav>
<script>
	$(function() {
		$(".pagination li a").click(function() {
			var pageNum = $(this).attr("data-pageNum");
			var href = $(this).attr("href");
			if (undefined == href) {
				return ;
			}
			$("#pageNum").val(pageNum).parent().submit();
		});
	});
</script>